package com.gjy.spring.s8;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.web.context.WebApplicationContext;

import javax.annotation.PreDestroy;

/**
 * @author 宫静雨
 * @version 1.0
 * @since 2023-12-20 10:49:12
 */
@Component
@Scope(WebApplicationContext.SCOPE_REQUEST)
public class BeanForRequest {

    private static final Logger log = LoggerFactory.getLogger(BeanForRequest.class);

    @PreDestroy
    public void destroy() {
        log.info("destroy");
    }
}
